package com.example.produces.service.impl;

import com.example.produces.entity.RawReturn;
import com.example.produces.entity.SalesReturn;
import com.example.produces.mapper.RawReturnMapper;
import com.example.produces.mapper.SalesReturnMapper;
import com.example.produces.service.SalesReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class SalesReturnImpl implements SalesReturnService {
    @Autowired
    private SalesReturnMapper rawReturnMapper;
    @Override
    public List<SalesReturn> findAll() {
        List<SalesReturn> rawReturns=rawReturnMapper.findAll();
        return rawReturns;
    }

    @Override
    public void add(SalesReturn rawReturn) {
        rawReturnMapper.add(rawReturn);
    }

    @Override
    public SalesReturn findOne(String name) {
        return rawReturnMapper.findOne(name);
    }

    @Override
    public void upDate(SalesReturn rawReturn) {
        rawReturnMapper.upDate(rawReturn);
    }

    @Override
    public void delete(String name) {
        rawReturnMapper.delete(name);
    }
}
